#ifndef SERVO_ERROR_CODE_H
#define SERVO_ERROR_CODE_H

#define DC_OVERCURRENT 0x2230     //母线过流
#define PHASE_OVERCURRENT 0x2320  //输出过流
#define ATUNE_OVERCURRENT 0x2321  //自学习过流
#define SAME_DIR_OVERSPD 0x8480   //同向超速
#define REV_DIR_OVERSPD 0x8481    //反向超速
#define VOER_MAX_SPD 0x8482       //超过最大转速
#define SPD_LAG_ERR 0x8483        //速度跟踪误差过大
#define OVER_MAX_ACC 0x8484       //加速度超差
#define SPD_STALL_ERR 0x8485      //电机失速
#define ENC_TIMEOUT 0x7380        //编码器连接超时

#define ENC_BATTERY_ALM 0x7381  //编码器电池欠压
#define ENC_BATTERY_ERR 0x7382  //编码器电池断开
//#define 	ENC_EEPROM_ERR			0x7383	//编码器存储角度错误

#define ENC_COUNT_ERR 0x7384  //编码器计数错误

#define ENC_DUAL_ERR 0x7385  //双编码器校验错误
#define ENC_Z_MISS 0x7387    //Z线捕捉故障

#define POS_LAG_ERR 0x8611       //位置偏差过大
#define POS_INC_OVER_LMT 0x8612  //位置指令增量过大
#define POS_ACC_OVER_LMT 0x8613  //加速度过大
#define POS_CMD_OVER_LMT 0x8614  //位置指令过大
#define CAN_OFF_LINE 0x8615      //CAN断线
#define UNDER_VOLTAGE 0x3220     //伺服欠压
#define OVER_VOLTAGE 0x3210      //伺服过压
#define FUSE_OPEN 0x3211         //保险丝断路
#define DRIVER_OVERTEMP 0x4310   //伺服过温

#define IGBT_I2T 0x2350    //模块过载（I2T）
#define OVER_POWER 0x5480  //伺服过功率

#define ENC_AUTOTURN_ERR 0x3380  //编码器校零失败
#define OUT_LACK_PHASE 0x3381    //输出缺相

#define IN_LACK_PHASE 0x3130     //输入缺相
#define CONNECT_ERR 0x5441       //内部连接错误
#define FPGA_ERROR 0x5280        //内部参数错误
#define PID_OVERFLOW 0x5281      //PID运算溢出
#define RobotSerie_ERR 0x5211    //Zu系列选择错误
#define MOTOR_OVERTEMP 0x4210    //电机过温
#define DBRAKE_OVER_LOAD 0x7182  //高频注入反向

#define POWER_ID_ERR 0x5210    //PowerID错误
#define EEPROM_ERR 0x5282      //EEPROM错误
#define POWERON_FAILED 0x5283  //上使能失败
#define ENC_OVERTEMP 0x6010    //编码器温度过热
#define MOTOR_I2T 0x7180       //电机过载(I2T)
#define BRAKE_ERR 0x7181       //电机抱闸故障
#define ENC_EEPROM_ERR 0x7383  //编码器内部错误
//#define     BIENC_ECC_ERR         0x7385  //双编码器校验错误
#define ENC_INTERNAL_ERR 0x7386  //编码器内部故障
#define Z_CATCH_FAULT 0x7387     //Z线捕捉故障
#define UNMATCHED_SERVO_VERSION 0x7580

#define ENC_MAG_SIGNAL_ERR 0x7388     //编码器磁信号异常
#define POS_DEVIATION_ERR 0x8000      //位置偏离-保护性停止(碰撞)
#define POS_DEVIATION_WARNING 0x8001  //位置偏离报警

#endif
